package com.chixing.day06.clone;

public class SchoolTest {
    public static void main(String[] args) throws CloneNotSupportedException {
        School sc = new School("菏泽",new SchoolBoss("葛军"));
        System.out.println("原生对象: "+ sc);
        School scClone = (School) sc.clone();
        System.out.println("克隆对象: "+scClone.getSchoolBoss().toString());
        System.out.println("==========👆浅克隆 👇深克隆================");
        School2 sc2 = new School2("文辉",new SchoolBoss2("马云"));
        System.out.println("原生对象: "+sc2);
        School2 school2 = (School2) sc2.clone();
        System.out.println("克隆对象: "+school2.getSchoolBoss2().toString());
    }
}
